package com.li.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.li.pojo.po.Dept;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author
 * @since 2024-04-11
 */
@Mapper
public interface DeptMapper extends BaseMapper<Dept> {
    @Select("select * from sys_dept where dept_id = #{parentId}")
    Dept selectDeptById(Integer parentId);

    void updateDept(Dept dept);

    Integer selectAncetors(Integer deptId);

    List<Dept> getTopId(Dept dept);

    @Select("select * from sys_dept")
    List<Dept> getAll();

    List<Dept> getDeptList(String deptName, String status);
}
